/**
 * Created by zhangligang
 * Email: tzhang2450@163.com
 * Date: 2018/11/24
 * Time: 05:50
 */
$(function(){
    var authorization = Cookies.get('_token');
    $.ajax({
        type: 'get',
        url: '/v1/teacher/get/file.json',
        headers: {
            Authorization: authorization,
            Accept: "application/json; charset=utf-8"
        },
        success: function(e){
            var data = JSON.parse(e);
            if (data.status == 200) {
                var json = data.body.data;
                if (json) {
                    var gender = json.gender == 1 ? '男' : '女';
                    var enroll = json.enroll == '0000-00-00 00:00:00' ? '' : json.enroll;
                    $('.username').text(json.username);
                    $('.realname').text(json.realname);
                    $('.gender').text(gender);
                    $('.number').text(json.number);
                    $('.identity').text(json.identity);
                    $('.mobile').text(json.mobile);
                    $('.email').text(json.email);
                    $('.enroll').text(enroll);
                    $('.university').text(json.university);
                    $('.college').text(json.college);
                }
            }
        }
    });
});